Skip to content

fix: Resolved the tag issue#117

Merged
Prajwal-Microsoft merged 3 commits into
devfrom
psl-tag-issue
Feb 19, 2026
Merged

fix: Resolved the tag issue#117
Prajwal-Microsoft merged 3 commits into
devfrom
psl-tag-issue

Conversation

@Prekshith-Microsoft

@Prekshith-Microsoft Prekshith-Microsoft commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

This pull request updates the way tags are assigned to resource groups in both the infra/main.bicep and infra/main_custom.bicep files. The main improvement is switching from object spread syntax to the union() function, which handles cases where resource group tags might be undefined, preventing errors and ensuring all tags are merged correctly.

Tag assignment improvements:

  • Replaced object spread syntax with the union() function for merging tags, using resourceGroup().tags ?? {} to handle cases where resource group tags may be undefined in both infra/main.bicep [1] and infra/main_custom.bicep [2].
  • Ensured that template-specific tags (TemplateName, Type, CreatedBy) are always included in the final tag set for the resource group in both files [1] [2].## Purpose
  • ...

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

What to Check

Verify that the following are valid

  • ...

Other Information

This pull request updates how resource group tags are merged in both infra/main.bicep and infra/main_custom.bicep to ensure that tags are combined more safely and robustly, especially when resourceGroup().tags might be null. The new approach uses the union() function to merge tags, which helps prevent errors and improves maintainability.

Improvements to tag merging logic:

  • Changed the tag assignment in resourceGroupTags to use the union() function, ensuring that resourceGroup().tags is safely merged (handles possible null values) with other tags and required template metadata in both infra/main.bicep [1] and infra/main_custom.bicep [2].

@Prajwal-Microsoft Prajwal-Microsoft merged commit 190195f into dev Feb 19, 2026
9 of 11 checks passed
@Roopan-Microsoft Roopan-Microsoft deleted the psl-tag-issue branch March 4, 2026 11:59
@github-actions

github-actions Bot commented Apr 8, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 1.0.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants